package com.aspose.cells;

class zcp extends zbz {
   static int a = 0;
   private int d = 0;

   zcp(CustomProperty var1) throws Exception {
      this.c(1048);
      String var2 = var1.getName();
      String var3 = var1.getValue();
      this.d = 7 + var2.length() + var3.length() * 2;
      this.c = new byte[this.d];
      this.c[1] = 16;
      System.arraycopy(com.aspose.cells.b.a.zc.a(var3.length() * 2), 0, this.c, 2, 4);
      this.c[6] = (byte)var2.length();
      System.arraycopy(Encoding.getASCII().a(var2), 0, this.c, 7, var2.length());
      System.arraycopy(Encoding.getUnicode().a(var3), 0, this.c, var2.length() + 7, var3.length() * 2);
   }

   void a(zqa var1) throws Exception {
      if (this.d < 8224) {
         this.a((short)this.d);
         super.a(var1);
      } else {
         byte[] var2 = new byte[4];
         System.arraycopy(com.aspose.cells.b.a.zc.a(this.f()), 0, var2, 0, 2);
         System.arraycopy(com.aspose.cells.b.a.zc.a((short)8224), 0, var2, 2, 2);
         var1.a(var2);
         var1.a(this.c, 0, 8224);
         int var3 = 8224;

         while(true) {
            int var4 = this.c.length - var3;
            if (var4 <= 8224) {
               System.arraycopy(com.aspose.cells.b.a.zc.a((int)1084), 0, var2, 0, 2);
               System.arraycopy(com.aspose.cells.b.a.zc.a(var4), 0, var2, 2, 2);
               var1.a(var2);
               var1.a(this.c, var3, var4);
               boolean var5 = false;
               break;
            }

            System.arraycopy(com.aspose.cells.b.a.zc.a((int)1084), 0, var2, 0, 2);
            System.arraycopy(com.aspose.cells.b.a.zc.a((short)8224), 0, var2, 2, 2);
            var1.a(var2);
            var1.a(this.c, var3, 8224);
            var3 += 8224;
         }
      }

   }
}
